package com.ruoyi.water.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.water.mapper.MyShortFlowingWaterMapper;
import com.ruoyi.water.domain.MyShortFlowingWater;
import com.ruoyi.water.service.IMyShortFlowingWaterService;

/**
 * 短剧消费流水表Service业务层处理
 * 
 * @author zunzun
 * @date 2023-11-21
 */
@Service
public class MyShortFlowingWaterServiceImpl implements IMyShortFlowingWaterService 
{
    @Autowired
    private MyShortFlowingWaterMapper myShortFlowingWaterMapper;

    /**
     * 查询短剧消费流水表
     * 
     * @param id 短剧消费流水表主键
     * @return 短剧消费流水表
     */
    @Override
    public MyShortFlowingWater selectMyShortFlowingWaterById(Long id)
    {
        return myShortFlowingWaterMapper.selectMyShortFlowingWaterById(id);
    }

    /**
     * 查询短剧消费流水表列表
     * 
     * @param myShortFlowingWater 短剧消费流水表
     * @return 短剧消费流水表
     */
    @Override
    public List<MyShortFlowingWater> selectMyShortFlowingWaterList(MyShortFlowingWater myShortFlowingWater)
    {
        return myShortFlowingWaterMapper.selectMyShortFlowingWaterList(myShortFlowingWater);
    }

    /**
     * 新增短剧消费流水表
     * 
     * @param myShortFlowingWater 短剧消费流水表
     * @return 结果
     */
    @Override
    public int insertMyShortFlowingWater(MyShortFlowingWater myShortFlowingWater)
    {
        myShortFlowingWater.setCreateTime(DateUtils.getNowDate());
        return myShortFlowingWaterMapper.insertMyShortFlowingWater(myShortFlowingWater);
    }

    /**
     * 修改短剧消费流水表
     * 
     * @param myShortFlowingWater 短剧消费流水表
     * @return 结果
     */
    @Override
    public int updateMyShortFlowingWater(MyShortFlowingWater myShortFlowingWater)
    {
        return myShortFlowingWaterMapper.updateMyShortFlowingWater(myShortFlowingWater);
    }

    /**
     * 批量删除短剧消费流水表
     * 
     * @param ids 需要删除的短剧消费流水表主键
     * @return 结果
     */
    @Override
    public int deleteMyShortFlowingWaterByIds(Long[] ids)
    {
        return myShortFlowingWaterMapper.deleteMyShortFlowingWaterByIds(ids);
    }

    /**
     * 删除短剧消费流水表信息
     * 
     * @param id 短剧消费流水表主键
     * @return 结果
     */
    @Override
    public int deleteMyShortFlowingWaterById(Long id)
    {
        return myShortFlowingWaterMapper.deleteMyShortFlowingWaterById(id);
    }
}
